/*    */ package com.zimbra.cs.index;
/*    */ 
/*    */ import com.google.common.base.Objects;
/*    */ import com.google.common.base.Objects.ToStringHelper;
/*    */ import java.util.Arrays;
/*    */ import java.util.List;
/*    */ import org.apache.lucene.search.SortField;
/*    */ import org.apache.lucene.search.TopFieldDocs;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class ZimbraTopFieldDocs
/*    */   extends ZimbraTopDocs
/*    */ {
/*    */   private final List<SortField> sortFields;
/*    */   
/*    */   protected ZimbraTopFieldDocs(int totalHits, List<ZimbraScoreDoc> scoreDocs, float maxScore, List<SortField> sortFields)
/*    */   {
/* 41 */     super(totalHits, scoreDocs, maxScore);
/* 42 */     this.sortFields = sortFields;
/*    */   }
/*    */   
/*    */   public static ZimbraTopFieldDocs create(int totalHits, List<ZimbraScoreDoc> scoreDocs, float maxScore, List<SortField> sortFields)
/*    */   {
/* 47 */     return new ZimbraTopFieldDocs(totalHits, scoreDocs, maxScore, sortFields);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */   public static ZimbraTopFieldDocs create(int totalHits, List<ZimbraScoreDoc> scoreDocs, List<SortField> sortFields)
/*    */   {
/* 54 */     return new ZimbraTopFieldDocs(totalHits, scoreDocs, NaN.0F, sortFields);
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */   public static ZimbraTopFieldDocs create(TopFieldDocs luceneTopFieldDocs)
/*    */   {
/* 61 */     return new ZimbraTopFieldDocs(luceneTopFieldDocs.totalHits, ZimbraScoreDoc.listFromLuceneScoreDocs(luceneTopFieldDocs.scoreDocs), luceneTopFieldDocs.getMaxScore(), Arrays.asList(luceneTopFieldDocs.fields));
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   public List<SortField> getSortFields()
/*    */   {
/* 70 */     return this.sortFields;
/*    */   }
/*    */   
/*    */ 
/*    */ 
/*    */   public SortField getSortField(int index)
/*    */   {
/* 77 */     return (SortField)this.sortFields.get(index);
/*    */   }
/*    */   
/*    */   public String toString()
/*    */   {
/* 82 */     return super.toString() + Objects.toStringHelper(this).add("sortFields", this.sortFields).toString();
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/index/ZimbraTopFieldDocs.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */